Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add comment syntax for switching styles #772

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

ak-1
Copy link
Contributor

@ak-1 ak-1 commented Feb 17, 2024

This is a follow-up to #748 with tests included.

Individual styles can be switched on and off:

<!-- vale StyleName1 = YES -->
<!-- vale StyleName2 = NO -->

For a rule to be effective both the rule and the style has to be enabled.

on and off is accepted in addition to YES and NO

<!-- vale StyleName1 = on -->
<!-- vale StyleName2 = off -->

Styles can be set (enabling them and switching off any other styles):

<!-- vale style = StyleName1 -->
<!-- vale styles = StyleName1, StyleName2 -->

Individual styles can be switched on and off:
```
<!-- vale StyleName1 = YES -->
<!-- vale StyleName2 = NO -->
```
For a rule to be effective both the rule and the style has to be enabled.

`on` and `off` is accepted in addition to `YES` and `NO`
```
<!-- vale StyleName1 = on -->
<!-- vale StyleName2 = off -->
```

Styles can be set (enabling them and switching off any other styles):
```
<!-- vale style = StyleName1 -->
<!-- vale styles = StyleName1, StyleName2 -->
```
@jdkato jdkato merged commit e6eec99 into errata-ai:v3 Nov 4, 2024
2 checks passed
@jdkato
Copy link
Member

jdkato commented Nov 4, 2024

Thanks for your work here!

@ccoVeille
Copy link
Contributor

Thanks it's what I needed for some files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants